package com.ctbu.tourism.service;

import com.ctbu.tourism.api.CollectionAPI;
import com.ctbu.tourism.entity.Forum;
import com.ctbu.tourism.entity.Message;
import com.ctbu.tourism.entity.Post;
import com.ctbu.tourism.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectionService {
    @Autowired
    CollectionAPI collectionAPI;

    public List<User> getUserCollectionUserByUID(Integer uid){ return collectionAPI.getUserCollectionUserByUID(uid);}

    public List<Forum> getUserCollectionForumByUID(Integer uid){ return collectionAPI.getUserCollectionForumByUID(uid);}

    public List<Post> getUserCollectionPostByUID(Integer uid){ return collectionAPI.getUserCollectionPostByUID(uid);}

    public Integer getUserCollectionNumsByUID(Integer uid){ return collectionAPI.getUserCollectionNumsByUID(uid);}

    public Integer deleteUserCollectionByUIDAndOID(Integer id){return collectionAPI.deleteUserCollectionByUIDAndOID(id);}

    public List<Integer> getCollectionPostUids(Integer oid){return collectionAPI.getCollectionPostUids(oid);}
    public List<Integer> getCollectionUserUids(Integer oid){return collectionAPI.getCollectionUserUids(oid);}
    public List<Integer> getCollectionForumUids(Integer oid){return collectionAPI.getCollectionForumUids(oid);}

    public Integer addCollectionU(Integer uid,Integer ouid){return collectionAPI.addCollectionU(uid,ouid);}
    public Integer addCollectionF(Integer uid,Integer ofid){return collectionAPI.addCollectionF(uid,ofid);}
    public Integer addCollectionP(Integer uid,Integer opid){return collectionAPI.addCollectionP(uid,opid);}

    public Integer deleteCollectionU(Integer uid,Integer ouid){return collectionAPI.deleteCollectionU(uid,ouid);}
    public Integer deleteCollectionF(Integer uid,Integer ofid){return collectionAPI.deleteCollectionF(uid,ofid);}
    public Integer deleteCollectionP(Integer uid,Integer opid){return collectionAPI.deleteCollectionP(uid,opid);}

    public List<User> getUserFollowersByUID(Integer oid){return collectionAPI.getUserFollowersByUID(oid);}
    public   List<Message> getMessageByUID(Integer uid){return collectionAPI.getMessageByUID(uid);}

    public Integer updateCollectionStatus(Integer uid){return collectionAPI.updateCollectionStatus(uid);}


}
